<!DOCTYPE html>
<!--suppress ALL-->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta charset="UTF-8">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link th:href="@{/bootstrap/bootstrap.min.css}" rel="stylesheet">
    <link rel="stylesheet" type="text/css" th:href="@{/css/jqTable.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/page/page.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/bootstrap/bootstrap.min.css}">
    <script th:src="@{/js/jquery-2.1.4.min.js}"></script>
    <script th:src="@{/bootstrap/bootstrap.min.js}"></script>

    <style type="text/css">
        .pageTest {
            width: 70%;
            height: 50px;
            margin-top: 0%;
        }

        .activP {
            background-color: #367fa9 !important;
            color: #fff !important;
        }
    </style>
    <style>
        .p20 {
            padding: 20px;
        }

        .mt20 {
            margin-top: 20px;
        }

        .mr10 {
            margin-right: 10px;
        }

        .hide {
            display: none;
        }

    </style>
</head>
<body style="background-color: #f9f9f9;opacity: 0.85;padding-left:5%;padding-right: 5%;-webkit-background-size: 100%;background-repeat: no-repeat;background-size: cover;background-attachment: fixed">
<div style="margin-bottom: 1%;margin-top: 3%" class="col-sm-12">
    <div class="col-sm-4" style="text-align: left">
        <a th:if="${str}" class="btn btn-primary" th:href="'/directionary/editor/zlpost/'+${dbid}+'/'+${str}+'@'+${page}" data-tag="Off">添加资料</a>
        <a th:unless="${str}" class="btn btn-primary" th:href="'/directionary/editor/zlpost/'+${dbid}+'/'+${page}" data-tag="Off">添加资料</a>
        <a class="btn btn-primary " href="javascript:;" data-tag="Off"
           th:onclick="|javascript:del('/directionary/editor/zlupdate/${dbid}/')|">删除</a>
        <a th:if="${dbid} eq '12'" class="btn btn-primary " href="/directionary/editor/fjs/12/1/1,0,0,0,0" data-tag="Off"
           >缺失详情</a>
    </div>
    <div class="col-sm-4" style="text-align: left">
        <div class="col-sm-4">
            <select id="searchField" style="padding-left: 20%;width: 100%;height: 34px;border-radius: 4px 4px 4px 4px;border-color: rgb(204 204 204)">
                <div th:each="sf:${searchList}">
                    <option style="text-align: center" th:text="${sf}" th:selected="${sf} eq ${word}"></option>
                </div>
            </select>
        </div>
        <div class="col-sm-8" style="margin-left: -1%">
            <div class="input-group">
                <input id="keyword" type="text" th:value="${str}" class="form-control">
                <span class="input-group-btn">
                        <button class="btn btn-default" type="button"
                                th:onclick="|javascript:search('/directionary/editor/solrSearch/${dbid}')|">检索</button>
                    </span>
            </div>
        </div>
    </div><!-- /.col-lg-6 -->
    <div class="col-sm-4" style="text-align: right">
        <!--<a class="btn btn-primary " href="javascript:;" data-tag="Off" onclick="editor()">修改</a>-->
        <a class="btn btn-primary " th:if="${dbid} eq '12'" th:text="'当前页异常信息'+${errors}"></a>
        <a class="btn btn-primary " th:text="'共'+${count}+'条数据'"></a>
    </div>
</div>
<div class="g-selectAll--main">
    <div class="c-table c-table--border">
        <table id="tab02" cellspacing="0" cellpadding="0" border="1" role="c-table">
            <thead>
            <tr>
                <th><b>选择</b>
                </th>
                <th align="center" th:each="colum:${ZlVo.colums}">
                    <b th:if="${dbid} eq '4' and ${columStat.index} eq '0'">
                        <input type="text" disabled value="客户名称" style="background-color: transparent;border: 0"/>
                    </b>
                    <b th:unless="${dbid} eq '4' and ${columStat.index} eq '0'"><input type="text" disabled
                                                                                       th:value="${colum}"
                                                                                       style="background-color: transparent;border: 0"/></b>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="values:${ZlVo.valuelist}">
                <b th:each="value:${values}">
                    <td th:if="${valueStat.index} eq '0'">
                        <input style="zoom: 140%" type="checkbox" class="g-selectAll--input"/>
                        <p hidden="hidden" th:text="'/directionary/editor/zlupdate/'+${dbid}+'/'+${value}">
                        </p>
                    </td>
                    <td th:if="${valueStat.index} eq '1'">

                        <a style="color: dodgerblue"
                           th:href="'/directionary/editor/zlupdate/'+${dbid}+'/'+${values.get(0)}+'/'+${page}"
                           th:text="${value}"></a>


                        <!--<a th:if="${str}" style="color: dodgerblue"-->
                           <!--th:href="'/directionary/editor/zlupdate/'+${dbid}+'/'+${values.get(0)}+'/'+${str}+'@'+${page}"-->
                           <!--th:text="${value}"></a>-->
                        <!--<a th:unless="${str}" style="color: dodgerblue"-->
                           <!--th:href="'/directionary/editor/zlupdate/'+${dbid}+'/'+${values.get(0)}+'/'+${page}"-->
                           <!--th:text="${value}"></a>-->
                    </td>
                    <!--<th th:if="${valueStat.index} eq '7'">-->
                        <!--<img th:if="${value} eq 'false'" src="/images/false.png">-->
                        <!--<img th:unless="${value} eq 'false'" src="/images/true.png">-->
                    <!--</th>-->
                    <td th:unless="${valueStat.index} eq '0' or ${valueStat.index} eq '1' or ${valueStat.index} eq '7'" th:text="${value}">
                    </td>
                    </td>
                </b>
            </tr>
            </tbody>
        </table>
    </div>
</div>
</div>
</div>
<div th:unless="${count} eq '0'">
    <ul class="pager" th:unless="${word}">
        <b th:if="${page} gt '1'">
            <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/1'+'/'"><<</a></li>
        </b>
        <b th:unless="${page} gt '1'">
            <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page}+'/'"><<</a></li>
        </b>
        <b th:if="${pageCount}>'5'">
            <li th:if="${page} gt '1'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${prePage}+'/'" th:text="${prePage}"></a></li>
            <b th:if="${diffValue}>='5'">
                <li><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page}+'/'" th:text="${page}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+1}+'/'" th:text="${page+1}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+2}+'/'" th:text="${page+2}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+3}+'/'" th:text="${page+3}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+4}+'/'" th:text="${page+4}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+5}+'/'">>></a></li>
            </b>
            <b th:unless="${diffValue}>='5'">
                <b th:each="p:${#numbers.sequence(0,diffValue)}">
                    <b th:if="${page+p} le ${pageCount}">
                        <li th:if="${p} eq '0'"><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                        </li>
                        <li th:unless="${p} eq '0'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                        </li>
                    </b>
                </b>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+diffValue}+'/'">>></a></li>
            </b>
        </b>
        <b th:unless="${pageCount}>'5'">
            <li th:if="${page} gt '1'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${prePage}+'/'" th:text="${prePage}"></a></li>
            <b th:each="p:${#numbers.sequence(0,pageCount)}">
                <b th:if="${page+p} le ${pageCount}">
                    <li th:if="${p} eq '0'"><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                    </li>
                    <li th:unless="${p} eq '0'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                    </li>
                </b>
            </b>
            <b th:unless="${pageCount}=='0'">
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${pageCount}+'/'">>></a></li>
            </b>
            <b th:if="${pageCount}=='0'">
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/1'">>></a></li>
            </b>
        </b>
    </ul>
</div>
<div th:unless="${count} eq '0'" th:if="${word}">
    <ul class="pager">
        <b th:if="${page} gt '1'">
            <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+'/1'+'/'"><<</a></li>
        </b>
        <b th:unless="${page} gt '1'">
            <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page}+'/'"><<</a></li>
        </b>
        <b th:if="${pageCount}>'5'">
            <li th:if="${page} gt '1'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${prePage}+'/'" th:text="${prePage}"></a></li>
            <b th:if="${diffValue}>='5'">
                <li><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page}+'/'" th:text="${page}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+1}+'/'" th:text="${page+1}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+2}+'/'" th:text="${page+2}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+3}+'/'" th:text="${page+3}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+4}+'/'" th:text="${page+4}"></a></li>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+5}+'/'">>></a></li>
            </b>
            <b th:unless="${diffValue}>='5'">
                <b th:each="p:${#numbers.sequence(0,diffValue)}">
                    <b th:if="${page+p} le ${pageCount}">
                        <li th:if="${p} eq '0'"><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                        </li>
                        <li th:unless="${p} eq '0'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                        </li>
                    </b>
                </b>
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+diffValue}+'/'">>></a></li>
            </b>
        </b>
        <b th:unless="${pageCount}>'5'">
            <li th:if="${page} gt '1'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${prePage}+'/'" th:text="${prePage}"></a></li>
            <b th:each="p:${#numbers.sequence(0,pageCount)}">
                <b th:if="${page+p} le ${pageCount}">
                    <li th:if="${p} eq '0'"><a style="background-color: gainsboro" th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                    </li>
                    <li th:unless="${p} eq '0'"><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${page+p}+'/'" th:text="${page+p}"></a>
                    </li>
                </b>
            </b>
            <b th:unless="${pageCount}=='0'">
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/'+${pageCount}+'/'">>></a></li>
            </b>
            <b th:if="${pageCount}=='0'">
                <li><a th:href="'/directionary/editor/solrSearch/'+${dbid}+'/'+${word}+'/'+${str}+'/1'">>></a></li>
            </b>
        </b>
    </ul>
</div>
<!--<script th:src="@{/pdfjs/jquery-1.11.3.min.pdfjs}"></script>-->
<script type="text/javascript" th:src="@{/page/page.js}"></script>

<!--开源模版引擎： art-template@4.12.2 for browser | https://github.com/aui/art-template  -->
<script th:src="@{/js/plugins/artTemplate.js}"></script>
<!--另一个插件，消息提示插件  -->
<script th:src="@{/js/plugins/message.js}"></script>
<!-- 必要插件：固定列滚动需要用到，鼠标滚动兼容多浏览器 -->
<script th:src="@{/js/jquery.mousewheel.min.js}"></script>
<!-- 总引入  -->
<script th:src="@{/js/zipJs/jqTable.all.min.js}"></script>

<!-- 也可分开引入  -->
<!-- <script src="pdfjs/jqTable.all.pdfjs"></script> -->
<!-- <script src="pdfjs/jqTablePlugins.pdfjs"></script>
<script src="pdfjs/jqTable.pdfjs"></script> -->
<!-- 临时用的json -->
<script th:src="@{/js/json.js}"></script>
<script type="text/javascript">
    function del(sp) {
        if ($("input[type='checkbox']:checked").length > 0) {
            var str = $("input[type='checkbox']:checked").next().text();
            $.post("/directionary/editor/zldelete", {
                str: str,
                sp: sp
            }, function () {
                alert("删除成功")
                window.location.reload()
            });
        }
        if ($("input[type='checkbox']:checked").length == 0) {
            alert("请先选择")
        }
    };

    function search(url) {
        var key = $('#keyword').val();
        var word=$('#searchField option:selected').val();
        if (key==''){
            window.location.replace(url + '/' + key + '/1');
        }else{
            window.location.replace(url + '/' +word+'/'+ key + '/1');
        }
    }
</script>
</body>
</html>
